﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;

namespace RStein.PosterousReader.WP.ViewModels.ViewObjects
{
  [DataContract]  
  public class PostVO : ViewObjectBase
    {
    private Uri m_detailUrl;
    private string m_title;
    private string m_body;
    private ObservableCollection<CommentVO> m_comments;

        public PostVO()
        {
            Comments = new ObservableCollection<CommentVO>();
        }
       

        [DataMember]  
        public Uri DetailUrl
        {
          get
          {
            return m_detailUrl;
          }          
          set
          {
            m_detailUrl = value;
            RaisePropertyChangedEvent(() => DetailUrl);
          }
        }

        [DataMember]  
        public string Title
        {
          get
          {
            return m_title;
          }
          set
          {
            m_title = value;
            RaisePropertyChangedEvent(() => Title);
          }
        }

        [DataMember]  
        public string Body
        {
          get
          {
            return m_body;
          }
          set
          {
            m_body = value;
            RaisePropertyChangedEvent(() => Body);
          }
        }
        
        [DataMember]  
        public ObservableCollection<CommentVO> Comments
        {
          get
          {
            return m_comments;
          }
          set
          {
            m_comments = value;
            RaisePropertyChangedEvent(() => Comments);
          }
        }
    }
}
